<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://genshi.edgewall.org/"
          xmlns:xi="http://www.w3.org/2001/XInclude" lang="en">
        <!-- Simple genshi template for walking the leonardo file system -->

         <!--! This is the site layout -->
        <xi:include href="page.html" />
        <xi:include href="directory.html" />
        
        <!-- Macros -->
        <tr py:def="selectList(prompt,name,l,default)">
            <td>$prompt</td>
            <td><select name="$name">${Markup(h.options_for_select(l,selected=default))}</select></td>
        </tr>
        
        <head>
        <!-- We'll be using the javascript helpers later, so let's make sure we have them -->
        ${Markup(h.javascript_include_tag(builtins=True))}
        </head>
        <body>
            
            <div class="mainPage">
                <h4 py:if="c.directoryTitle"> $c.directoryTitle</h4>
                <div py:replace="directory(c.files,c.dirs)"/>
                <h4> ${c.title or c.path} </h4>
                <form action="$c.action" method="POST">
                <p>Title:&nbsp;<input type="text" name="title" value="$c.title" size="50"/></p>
               
                <p><textarea name="page_content" rows="25" cols="80">$c.content</textarea></p>
                <!--
                <p>Categories:&nbsp;<input type="text" name="categories" value=$c.categories size="50"/>
                -->
                <table class="nolayout">
                    <tr py:replace="selectList('Allow comments?','allow_comments',['YES','NO','READONLY'],c.allowComments)"/>
                    <tr py:replace="selectList('Allow trackback?','allow_trackbacks',['YES','NO','READONLY'],c.allowTrackBacks)"/>
                    <tr py:replace="selectList('Keep previous last modified?','keep_last_modified',['YES','NO'],'NO')"/>
                </table>
             
                <p><input type="submit" value="submit"/>&nbsp;as&nbsp;<input type="text"
                 name="page_content_type" value="$c.contentType" size="8"/>&nbsp;to&nbsp;<input type="text" name="resource" value="$c.targetpath" size="50"/></p>
                </form>
                <a href="${c.path}">Cancel</a>
            </div>
        </body>
        
    </html>
